import { Application } from 'egg';

export default (app: Application) => {
    const { STRING, CHAR,TEXT } = app.Sequelize;
    const model = app.model.define('News', {
        news_id: {
            type: CHAR(32),
            primaryKey: true,
            comment:'新闻主键'
        },
        news_title: {type:STRING(50),comment:'新闻标题'},
        news_summary:{type:STRING(200),comment:'简介'},
        news_detail: {type:TEXT,comment:'新闻内容'},
        is_delete: {type:CHAR(1),comment:'标识是否删除（0：否 1：是）'}
    }, { tableName: 't_news' });
    return model;
};
export class News {
    news_id: string;
    news_title: string;
    news_summary:string;
    news_detail:string;
    is_delete: string;
}